how to create dynamic librray